package mc

import "github.com/sirupsen/logrus"

var (
    // 400 (http.StatusBadRequest)
    // 错误请求 （大部份逻辑处理过期中的错误放在此分类下）
    ErrorBadRequest        		*Result = &Result{HttpStatus:400, Code:"4000000", Message:"错误请求", LogLevel:logrus.WarnLevel, IsInfo:true}
    ErrorBadParameter      		*Result = &Result{HttpStatus:400, Code:"4000001", Message:"错误请求：参数错误", LogLevel:logrus.WarnLevel, IsInfo:true}
    ErrorBadParameterValue 		*Result = &Result{HttpStatus:400, Code:"4000002", Message:"错误请求：参数值错误", LogLevel:logrus.WarnLevel, IsInfo:true}
    ErrorContentExists			*Result = &Result{HttpStatus:400, Code:"4000030", Message:"内容已存在", LogLevel:logrus.WarnLevel, IsInfo:true}

    // 401 (http.StatusUnauthorized)
    // 认证失败 （认证、签名、token相关错误放在此分类下）
    ErrorUnauthorized			*Result = &Result{HttpStatus:401, Code:"4010000", Message:"认证失败", LogLevel:logrus.WarnLevel, IsInfo:true}


    // 403 (http.StatusForbidden)
    // 服务禁止 (服务禁止、超额调用等、无权限相关错误放在此分类下）
    ErrorRequestForbidden 		*Result = &Result{HttpStatus:403, Code:"4030000", Message:"已禁止的服务", LogLevel:logrus.PanicLevel}

    // 404 (http.StatusNotFound)
    // 资源未找到 （内容不存在可以放在此分类下）
    ErrorResourceNotFound 		*Result = &Result{HttpStatus:404, Code:"4040000", Message:"资源未找到", LogLevel:logrus.WarnLevel, IsInfo:true} //主要是数据库连接、redis服务类
    ErrorContentNotFund			*Result = &Result{HttpStatus:404, Code:"4040001", Message:"请求的内容未找到", LogLevel:logrus.WarnLevel, IsInfo:true} //主要是数据内容类的

    // 500 (http.StatusInternalServerError)
    // 内部错误 (运行错误、不可知错误放在此分类下）
    ErrorInternalServerError 	*Result = &Result{HttpStatus:500, Code:"5000000", Message:"服务器内部错误", LogLevel:logrus.ErrorLevel}

    // 503 (http.StatusServiceUnavailable)
    // 服务不可用 (停服维护等)
    ErrorServiceUnavailable 	*Result = &Result{HttpStatus:503, Code:"5030000", Message:"暂停服务", LogLevel:logrus.PanicLevel}
)
